﻿@using ModelToDto
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>@ViewData["Title"] - 后台管理</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
</head>
<style>
    .btn {
        height: 30px !important;
        line-height: 18px !important;
    }

    .dropdown {
        height: 50px;
        color: white;
        width: 120px;
        align-items: center;
        text-decoration: none;
        font-size: 20px
    }



        .dropdown a {
            height: 50px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

    .text-dark {
        color: #000 !important;
    }

    .dropdown:hover {
        background-color: #0d67ec;
        font-weight: bold;
    }

        .dropdown:hover .dropdown-menu {
            display: block;
        }

    .dropdown-menu {
        display: none;
    }

    .dropdown:hover .dropdown-menu li {
        height: 50px;
        display: flex;
        flex-direction: column;
    }

    .dropdown .dropdown-menu li:hover {
        background-color: #0d67ec;
    }

    .dropdown .dropdown-menu li a {
        color: grey;
        text-decoration: none;
        margin-left: 0px;
    }

    .dropdown .dropdown-menu li:hover a {
        color: white;
    }

    .container-fluid {
        height: 70px;
        background-color: #0d6efd;
    }

    .navbar {
        padding: 0;
    }

    .div-table {
        height: 560px;
        width: 100%;
    }

</style>
<body>
    <header>
        <ul class="nav nav-pills">
            @{
                List<MenueDTO> menuedtoLit = ViewData["MenueAllList"] as List<MenueDTO>;
            }
            @if (menuedtoLit != null)
            {
                @foreach (MenueDTO menueInfo in menuedtoLit)
                {
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-expanded="false">@menueInfo.Meu_Name</a>
                        <div class="dropdown-menu">


                            @foreach (var menueItem in menueInfo.ChildList)
                            {
                                <a class="dropdown-item" href="@menueItem.Meu_Url">@menueItem.Meu_Name</a>
                            }
                        </div>
                    </li>
                }

            }
    </header>
    <div class="container">
        <main role="main" class="pb-3">
            @RenderBody()
     </main>
    </div>

    <footer class="border-top footer text-muted">
        <div class="container">
            &copy; 2024 - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
        </div>
    </footer>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-7ymO4nGrkm372HoSbq1OY2DP4pEZnMiA+E0F3zPr+JQQtQ82gQ1HPY3QIVtztVua" crossorigin="anonymous"></script>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>
    @await RenderSectionAsync("Scripts", required: false)
</body>
</html>
